package endcourseproject;
import lejos.nxt.*;
import lejos.nxt.addon.*;
import lejos.robotics.navigation.CompassPilot;

 public class CompassTest {
	
	private static final float WHEEL_DIAMETER = 5.6F;
	private static final float TRACK_WIDTH = 11.5F;
	 
	public static void main(String[] args) throws Exception {
		//CompassSensorMA compass = new CompassSensorMA(SensorPort.S1);
		CompassSensor compass = new CompassSensor(SensorPort.S1);
		
		CompassPilot cp = new CompassPilot(new CompassSensor(SensorPort.S2), WHEEL_DIAMETER, TRACK_WIDTH,
				Motor.C, Motor.B);
					
		while(!Button.ESCAPE.isPressed()) {
			LCD.clear();
			LCD.drawInt((int) compass.getDegrees(), 0, 0);
			LCD.refresh();
			Thread.sleep(500);
		}
	}	
}
